@echo off
setlocal enabledelayedexpansion

@rem for /f "tokens=4" %%i in ('getmac -v^|findstr /i "stopped"') do echo %%i
@rem for /f "tokens=4" %%i in ('getmac -v^|findstr /c:"Bluetooth Devic"') do echo %%i
@rem for /f "tokens=4" %%i in ('getmac -v ^|findstr /c:"Bluetooth Devic"') do echo %%i

for /f "tokens=4" %%i in ('getmac -v ^|findstr /c:"Bluetooth Devic"') do (
    echo %%i
    set strmac=%%i
    echo !strmac!
)

Set "strmac=!strmac:-=!"
echo !strmac!

exit /B 0

